import request from '@/api/request';

// 获取购物车全部列表
export function index() {
    return request('/businessAdmin/catering/mainPageData', 'get');
}

// 添加购物车 inCartCount 添加购物车的数量
export function addShoppingCart(data) {
    return request('/businessAdmin/catering/mshoppingcart/editGoods', 'post', data);
}

//获取购物车全部列表
export function getAllGoods(data) {
    return request('/businessAdmin/catering/mshoppingcart/getAllGoods', 'get', data);
}

//删除购物车商品
export function removeGoods(data) {
    return request('/businessAdmin/catering/mshoppingcart/removeGoods', 'post', data);
}

//获取手机号码
export function getMobile(data) {
    return request('/auth/oauth/token', 'get', data);
}
//绑定openid
export function bindUser(data) {
    return request('/businessAdmin/catering/bindUser', 'post', data);
}
//取消订单
export function closeOrder(data) {
    return request('/businessAdmin/catering/morder/closeOrder', 'get', data);
}

//取消订单
export function repay(data) {
    return request('/businessAdmin/catering/morder/repay', 'get', data);
}

//获取门店列表
export function getRecords(data) {
    return request('/operations/cdshopbase/page', 'get', data);
}

//获取门店列表
export function getInfo() {
    return request('/driver/cduser/getInfo', 'get');
}

//订单预览
export function previewOrder(data) {
    return request('/businessAdmin/catering/morder/previewOrder', 'post', data);
}

//下单
export function createOrder(data) {
    return request('/businessAdmin/catering/morder/createOrder', 'post', data);
}

//商品详情

export function goodsDetails(id) {
    return request('/businessAdmin/catering/goodsDetails?id=' + id, 'get');
}

//获取订单列表
export function getOrderList(data) {
    return request('/businessAdmin/catering/morder/page', 'get', data);
}

// 积分明细
export function integralsHistory(data) {
    return request('/driver/cdTask/integralsHistory', 'get', data);
}
//更新个人信息
export function updateUserInfo(data) {
    return request('/businessAdmin/catering/updateUserInfo', 'post', data);
}

//获取订单详情
export function orderDetails(id) {
    return request('/businessAdmin/catering/morder/orderDetails?id=' + id, 'get');
}
//获取订单详情
export function addAtMiniApp(data) {
    return request('/businessAdmin/cdshopfeedback/addAtMiniApp', 'post', data);
}
export function miniAppConfig() {
    return request('/driver/util/miniAppConfig');
}

//扫描二维码

export function getScan(data) {
    return request('/operations/cmcapsule/scan', 'get', data);
}
export function anonymousScan(data) {
    return request('/operations/cmcapsule/anonymousScan', 'get', data);
}

// 新增绑定车牌
export function addMyNewCar(data) {
    return request('/charge/cduserbindcar/addMyNewCar', 'post', data);
}

// 删除绑定车牌
export function deleteMyNewCar(data) {
    return request('/charge/cduserbindcar/deleteMyNewCar', 'post', data);
}

// 修改绑定车牌
export function editCarNumber(data) {
    return request('/charge/cduserbindcar/editCarNumber', 'post', data);
}

// 获取优惠券
export function getCoupon(data) {
    return request('/pay/mpCoupon/getCoupon', 'get', data)
}

// 获取门店车辆信息列表
export function getStoreCarInfoList(data) {
    return request('/operations/mpcarinfo/carInfoListByStoreId', 'get', data);
}

